import React from 'react';
/**
 * 动态获取icon
 * @param {*} name 
 * @returns 
 */
export const lazyLoadIcon = (name) => {
    return <React.Suspense fallback={<></>}>
        {React.createElement(React.lazy(() => import('@ant-design/icons').then(module => {
            return { default: module[name] };
        })), {})}
    </React.Suspense>
}